﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        public static void Main()
        {
            var foo = new Foo();
            foreach (var item in foo)
            {
                Console.WriteLine(item);
            }

            Console.ReadKey();
        }

        // Define other methods and classes here
        class Foo
        {
            private readonly List<int> data = new List<int> { 1, 2, 3 };

            public IEnumerator<int> GetEnumerator() => data.GetEnumerator();
        }
    }
}
